export default class ColorUtils {
    public static LightenDarkenColor(col: cc.Color, amt: number = 10): cc.Color {
        const r = col.getR() + amt;
        const b = col.getB() + amt;
        const g = col.getG() + amt;
        const color = cc.Color.BLACK;
        color.setR(r < 0 ? 0 : r);
        color.setB(b < 0 ? 0 : b);
        color.setG(g < 0 ? 0 : g);
        color.setR(r > 255 ? 255 : r);
        color.setB(b > 255 ? 255 : b);
        color.setG(g > 255 ? 255 : g);
        color.setA(col.getA());

        return color;
    }

}
